<%--
  Created by IntelliJ IDEA.
  User: lucky
  Date: 2020/10/9
  Time: 16:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="js/jquery-1.8.3.min.js" language="JavaScript"></script>
    <script language="JavaScript">
        $(function () {
           $("#but01").click(function () {
               alert(123)
               $.post("getStus",null,function (data) {
                   var str="<table border='2'><tr><td>学号</td><td>姓名</td><td>性别</td><td>年龄</td></tr>"
                   for (var i=0;i<data.length;i++){
                       var s=data[i];

                       str =str+"<tr><td>"+s.studentno+"</td><td>"+s.studentname+"</td><td>"+s.sex+"</td><td>"+s.age+"</td></tr>";
                   }
                   str=str+"</table>";
                   $("#show").html(str)
               },"json")
           })
        })
    </script>
</head>
<body>
<h2>显示学生</h2>
    <input type="button" id="but01" value="加载学生"/>
<div id="show"></div>
</body>
</html>
